package collection.set;

import java.util.Comparator;

public class MyComparator implements Comparator {
    public int compare(Object o1, Object o2) {
        if (o1 instanceof Person && o2 instanceof Person) {
            Person s1 = (Person) o1;
            Person s2 = (Person) o2;
            return s1.getScore() - s2.getScore();
        }
        return 0;
    }

}
